import request from '@/utils/request'

// 查询评估任务列表
export function listTasks(query) {
  return request({
    url: '/console/appraiseTask/list',
    method: 'post',
    data: query
  })
}

// 查询评估任务详细
export function getTasks(data) {
  return request({
    url: "/console/appraiseTask/getInfo",
    method: 'post',
    data
  })
}

// 新增评估任务
export function addTasks(data) {
  return request({
    url: '/console/tasks',
    method: 'post',
    data: data
  })
}

// 修改评估任务
export function updateTasks(data) {
  return request({
    url: '/console/appraiseTask/edit',
    method: 'post',
    data: data
  })
}

// 删除评估任务
export function delTasks(id) {
  return request({
    url: '/console/appraiseTask/remove',
    method: 'post',
    data: id
  })
}

// 创建评估任务
export function creactAppraiseTask(data) {
  return request({
    url: '/console/appraiseTask/add',
    method: 'post',
    data: data
  })
}

// 测试数据库
export function connectTestDatabase(data) {
  return request({
    url: '/console/datasourceInfo/databaseCheck',
    method: 'post',
    data: data
  })
}

// 启动调度器
export function dataTaskconfScheduler(data) {
  return request({
    url: '/console/dataTaskconf/scheduler',
    method: 'post',
    data: data
  })
}

// 立即执行
export function dataTaskconfadd(data) {
  return request({
    url: '/console/dataTaskconf/add',
    method: 'post',
    data: data
  })
}

export function dataTaskconfExecute(data) {
  return request({
    url: '/console/dataTaskconf/execute',
    method: 'post',
    data: data
  })
}

export function dataTaskLogExecute(data) {
  return request({
    url: '/console/appraiseTask/execute',
    method: 'post',
    data: data
  })
}

export function dataTaskconfedit(data) {
  return request({
    url: '/console/dataTaskconf/edit',
    method: 'post',
    data: data
  })
}

// 评估报告列表
export function dataTaskJobList(data) {
  return request({
    url: '/console/taskLog/list',
    method: 'post',
    data: data
  })
}


// 评估报告列表
export function dataTaskLogGetInfo(data) {
  return request({
    url: '/console/taskLog/getInfo',
    method: 'post',
    data: data
  })
}

export function dataTaskLogGetNew(data) {
  return request({
    url: '/console/taskLog/getNew',
    method: 'post',
    data: data
  })
}

export function dataTaskLogGetNewLog(data) {
  return request({
    url: '/console/taskLog/getNewLog',
    method: 'post',
    data: data
  })
}